﻿using UnityEngine;
using System.Collections;

public class SetBattle : MonoBehaviour 
{
    public GameObject _prefabPlayer1;
    public GameObject _positionPlayer1;

    public GameObject _prefabPlayer2;
    public GameObject _positionPlayer2;

    public GameObject _cameraJ1;
    public GameObject _cameraJ2;

	// Use this for initialization
	void Start () 
    {
	    if (Network.isServer)
        {
            Network.Instantiate(_prefabPlayer1, _positionPlayer1.transform.position, Quaternion.identity, 0);
            Destroy(_cameraJ2);
        }
        else
        {
            Network.Instantiate(_prefabPlayer2, _positionPlayer2.transform.position, Quaternion.identity, 0);
            Destroy(_cameraJ1);
        }
	}
	
	// Update is called once per frame
	void Update () 
    {
	
	}
}
